var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { ishead:true});
});
router.get('/mechanism', function(req, res, next) {
    res.render('mechanism', { ishead:true});
});
router.get('/hospital', function(req, res, next) {
    var id = req.query.id || 0;
    res.render('hospital', { ishead:true,hosId:id});
});
router.get('/example', function(req, res, next) {
    res.render('example', { ishead:true});
});
router.get('/news', function(req, res, next) {
    res.render('news', { ishead:true});
});
router.get('/example/detail', function(req, res, next) {
    var id = req.query.idx || 0;
    res.render('exampleDetail', { ishead:true ,detailIdx:id});
});
// consumers 服务对象
router.get('/consumers', function(req, res, next) {
    res.render('consumers', { ishead:true });
});
// process 定制方案
router.get('/process', function(req, res, next) {
    res.render('process', { ishead:true });
});
// about 关于我们
router.get('/about', function(req, res, next) {
    res.render('about', { ishead:true });
});

router.get('/about/form', function(req, res, next) {
    var phone = req.query.p;
    res.render('testElement', { ishead:true ,phone:phone});
});
module.exports = router;

